package service.impl;

import dao.AddressDao;
import dao.impl.AddressDaoImpl;
import model.Address;
import service.AddressService;

import java.util.List;

/**
 * @Description:
 * @Author one world
 * @Date 2020/9/23 0023 11:11
 */
public class AddressServiceImpl implements AddressService {
    AddressDao dao = new AddressDaoImpl();

    @Override
    public List<Address> findByUserId(int id) {
        return dao.findByUserId(id);
    }

    @Override
    public Address findById(Integer id) {
        return dao.findByPK(id);
    }

    @Override
    public boolean add(Address address) {
        return dao.add(address);
    }

    @Override
    public boolean del(Integer id) {
        return dao.delByPK(id);
    }

    @Override
    public boolean update(Address address) {
        return dao.update(address);
    }

    @Override
    public Address findByOrderNo(String order_no) {
        return dao.findByOrderNo(order_no);
    }
}
